package com.zxl.working.task;

import com.zxl.working.service.TaskService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component
@Configuration
@EnableScheduling
public class DailyTask {

    private static Logger logger = LogManager.getLogger(DailyTask.class);


    @Autowired
    private TaskService taskService;

    @Scheduled(cron = "1/10 * * * * ?")
    @Transactional(rollbackFor = Exception.class)
    public void daliyCpm(){
       /* taskService.recordTrans();

        taskService.insSellerProvideOrder();

        taskService.updSellerAccount();

        taskService.updAgentAccount();*/
    }
}
